package com.minimalist.common.entity.basic.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author 11987
 */
@Schema(name = "图形验证码响应实体")
public class ImageCaptchaVO implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "enable", description = "是否启用验证码", type = "boolean")
    private Boolean enable;

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    @Schema(name = "captchaId", description = "验证码ID", type = "string")
    private String captchaId;

    public String getCaptchaId() {
        return captchaId;
    }

    public void setCaptchaId(String captchaId) {
        this.captchaId = captchaId;
    }

    @Schema(name = "captchaImg", description = "验证码图片Base64编码", type = "string")
    private String captchaImg;

    public String getCaptchaImg() {
        return captchaImg;
    }

    public void setCaptchaImg(String captchaImg) {
        this.captchaImg = captchaImg;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ImageCaptchaVO that = (ImageCaptchaVO) o;
        return Objects.equals(enable, that.enable) &&
               Objects.equals(captchaId, that.captchaId) &&
               Objects.equals(captchaImg, that.captchaImg);
    }

    @Override
    public int hashCode() {
        return Objects.hash(enable, captchaId, captchaImg);
    }

    @Override
    public String toString() {
        return "ImageCaptchaVO{" +
               "enable=" + enable +
               ", captchaId='" + captchaId + '\'' +
               ", captchaImg='" + captchaImg + '\'' +
               '}';
    }
}
